﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PRO.Permission.Entity;
using System.Data;

namespace PRO.PermissionProvider
{
    public interface IPermissionProvider
    {
        int AddPermissionGroup(PermissionGroup g);
        bool EditPermissionGroup(PermissionGroup g);
        bool DelPermissionGroup(int id);


        int AddPermission(PermissionItem g);
        bool EditPermission(PermissionItem g);
        bool DelPermission(int id);

        DataTable GetPermissions();
        DataTable GetPermissionsByGroup(int groupid);

        DataTable GetPermissionGroup();
        bool SetPermission(int userid, string permissions);
        bool IsAuthorized(int userid, string permission);
        bool CheckPermissionDataBase();
    }
}
